import { ParamType } from "../api-server/types";

/* eslint-disable no-unused-vars */
export enum ChartType {
  LINE = "line",
  SCATTER = "scatter",
  LINEAREA = "lineArea",
}

/* eslint-enable no-unused-vars */
export interface Chart {
  title: string;
  color: string;
  paramType: ParamType;
  expression: string;
  isOpen?: boolean;
}

export interface WorkSpaceSetting {
  profileChartParmas: string;
  chartsHeight: string;
  setBgByStateQuantity: boolean;
  stateQuantityParams: string;
  backgroundColors: string[];
}

export interface WorkSpace {
  name: string;
  splitType: string;
  setting: WorkSpaceSetting;
  splitCharts: ChartItem[];
  id?: string;
}
export interface ChartItem {
  name: string;
  chartType: ChartType;
  upperLimit: string;
  lowerLimit: string;
  XOffset: string;
  YOffset: string;
  IsTop: boolean;
  data: Chart[];
}

export interface ParamsNameExpr {
  name: string;
  expr: string;
  type: ParamType;
}

export interface ParamsMapping {
  [x: string]: string;
}
